import qs from 'qs'
// axios
import request from '@/projects/invoice/utils/request'

export const saveInvoice =(query)=>{
  return request({
    url: '/api/xmbz-order/orderInvoice/open/save',
    method: 'post',
    data: query,
  })
}

// 验证渠道
export const validChannel =(params)=>{
  return request({
    url: '/api/xmbz-order/orderInvoice/open/validChannel',
    method: 'get',
    params,
    hideloading: true
  })
}

// 手机号查询发票
export const listOrderInvoice =(params)=>{
  return request({
    url: '/api/xmbz-order/orderInvoice/open/listOrderInvoice',
    method: 'get',
    params,
  })
}

export function getCaptcha(params) {
  return request({
    url: '/api/xmbz-order/orderGroupLink/open/phoneCaptcha',
    method: 'get',
    params,
  })
}

export function verifyCaptcha(params) {
  // H5获取图形验证码
  return request({
    url: '/api/xmbz-order/orderGroupLink/open/v3/verifyCaptcha',
    method: 'get',
    params,
  })
}
